﻿
var express = require('express')
var app = express();
var server = require('http').Server(app);
var io = require('socket.io')(server);

app.use(express.json({ limit : '800mb' }))

// app.use('/api/static', express.static('./eshop'))

// 解决跨域请求
app.use(require('cors')())

require('./http')(app, io)
require('./io')(io)

server.listen(4000,() => {
    console.log(`
    http://127.0.0.1:4000
    http://127.0.0.1:4000/api/socketLinks
    `);
});